package com.mzj.saas.mservice.lock.Repository;

import com.mzj.saas.mservice.lock.entity.SmartLockFace;
import com.mzj.saas.mservice.lock.entity.SmartLockFingerprint;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface SmartLockFaceRepository extends PagingAndSortingRepository<SmartLockFace, Long>, JpaSpecificationExecutor<SmartLockFingerprint> {

    SmartLockFace findByLockAuthId(Long lockAuthId);

    int deleteByLockAuthId(Long lockAuthId);

    @Modifying
    int deleteByLockId(Long lockId);
}
